<%-- 
    Document   : search
    Created on : Oct 31, 2011, 3:04:49 AM
    Author     : northpole
--%>
<%@page import="javax.naming.spi.DirStateFactory.Result"%>
<%@page import="java.util.ArrayList"%>
<%@page import="user.User" contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
    <%User userInfo=null;
   userInfo=(User) session.getAttribute("userInfo");
String params=request.getParameter("username");
ArrayList result=null;
if(params!=null)
{
        result=userInfo.search(params);
}
%>
    </head>
<body>
<%
if(result!=null)
{for(int i=0;i<result.size();i++)
{%>
<a href"profile.jsp?username=<%out.print(result.get(i));%>">
<%out.print(result.get(i));
}
 %>
</a>
<%}
else%>
your code for complex search here
</body>
</html>
